package org.example.myleet.p524;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.JsonUtils;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue("apple".equals(solution.findLongestWord("abpcplea", JsonUtils.parse("[\"ale\",\"apple\",\"monkey\",\"plea\"]", List.class))));
        Assert.isTrue("a".equals(solution.findLongestWord("abpcplea", JsonUtils.parse("[\"c\",\"b\",\"a\"]", List.class))));
        Assert.isTrue("".equals(solution.findLongestWord("abpcplea", JsonUtils.parse("[\"bag\",\"bpd\",\"apien\"]", List.class))));
        Assert.isTrue("apple".equals(solution.findLongestWord("abpcplea", JsonUtils.parse("[\"ale\",\"apple\",\"monkey\",\"plea\", \"abpcplaaa\",\"abpcllllll\",\"abccclllpppeeaaaa\"]", List.class))));
    }
}
